namespace Wips.AppService.CommonViewModels;

public class MenuItemViewModel
{
    /// <summary>
    /// 授权方式
    /// </summary>
    public string? Authority { get; set; } = "canAdmin";

    /// <summary>
    /// 子项通道
    /// </summary>
    public List<MenuItemViewModel> Routes { get; set; }= new List<MenuItemViewModel>();

    /// <summary>
    /// 子项通道
    /// </summary>
    public List<MenuItemViewModel> Children { get; set; } = new List<MenuItemViewModel>();


    /// <summary>
    /// 基础配置
    /// </summary>
    public MenuConfigViewModel Menu { get; set; } = new MenuConfigViewModel();

    /// <summary>
    /// 是否隐藏子菜单
    /// </summary>
    public bool HideChildrenInMenu { get; set; } = false;

    /// <summary>
    /// 是否隐藏菜单
    /// </summary>
    public bool HideInMenu { get; set; } = false;

    /// <summary>
    /// 图标
    /// </summary>
    public string? Icon { get; set; }

    /// <summary>
    /// 本地化
    /// </summary>
    public string? Locale { get; set; }

    /// <summary>
    /// 显示名称
    /// </summary>
    public string? Name { get; set; }

    /// <summary>
    /// 跳转路径
    /// </summary>
    public string? Path { get; set; }

    /// <summary>
    /// 组件
    /// </summary>
    public string Key { get; set; }

    /// <summary>
    /// 所属微前端
    /// </summary>
    public string? MicroApp { get; set; }

    /// <summary>
    /// 上级parent
    /// </summary>
    public string? ParentId { get; set; }

    /// <summary>
    /// 排序
    /// </summary>
    public int Sort { get; set; }
}

public class MenuConfigViewModel
{
    public bool FlatMenu { get; set; } = false;
}